package com.luban;

import com.luban.service.C;
import com.luban.service.UserService;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class Test {

	public static void main(String[] args) {

		AnnotationConfigApplicationContext applicationContext = new AnnotationConfigApplicationContext(AppConfig.class);

		String[] beanDefinitionNames = applicationContext.getBeanDefinitionNames();
		for (int i = 0; i < beanDefinitionNames.length; i++) {
			System.out.println(beanDefinitionNames[i]);
		}
		C bean = (C) applicationContext.getBean("com.luban.service.C");
		//bean.add();
	//	UserService userService = applicationContext.getBean("userService", UserService.class);

		//userService.test();


		//

	}
}
